EDA Code for Temporal Exploration

Import all libraries used.

Set plot style for matplotlib.

Functions

Perform all time series decompositions here.

Example

The following cell is an example time-series decomposition. This is multi-year temperature data for BARRIE-ORO, with a seasonality period of 8760 hours or 365 days.

Decomposed Temperature Data, Annual Period

Decomposed Temperature Data, Daily Period, Winter 2023

The following cell is another example time-series decomposition. This is temperature data for OSHAWA over the first quarter of 2023, with a seasonality period of 24 hours.

The following lists for all stations their lowest correlation coefficient when compared to other stations for observed temperature data.

In comparison to the above, the following lists for all stations their lowest correlation coefficient when compared to other stations for the trend component of the temperature data decomposition are seemingly much lower.

And we do the same for the seasonal component.

Finally, we do the same for the residual component.

Visualized below are the trend components. Notice the clear correlation between the trend components!

Exploratory

Everything below is experimental.

Vapor Pressure Decomposition

Relative Humidity Decomposition

Precip Amount Decomposition

Station Pressure

Wind Speed

Autocorrelation Analysis

Based on the above cells, the only ones that are really worth decomposing are temp and potentially RH and vapor pressure. Let's try to run autocorrelation analysis on temp, RH and vapor pressure.

Working with Lagged Data

Experimental

Everything below this is highly experimental EDA.

Trying this with Prophet, not sure this worked out.